<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <title>人员分组检索查询</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/list.css">
    <%-- <script src="${ctxStatic}/jquery/jquery-1.9.1.min.js"></script> --%>
    <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
    <script src="${ctxStatic}/js/DateTimePicker.js"></script>
    <script src="${ctxStatic}/js/layer.js"></script>
    <script src="${ctxStatic}/js/style.js"></script>
 
    <script type="text/javascript">
    // list 一览
    $(document).ready(function(){
    	searchListForm();
    	});
    
		// 检索按钮实装方法
		function searchListForm() {
			var sName = $("#groupName").val();
			$("#activity_pane").showLoading();
			$.post("${ctx}/personnel/group/searchList?groupName="+sName, "", function(result) {
				var listHtml = result["personnel"];
				var pageHtml = result["page"];
				$("#listHtml").html(listHtml);
				$("#paging").html(pageHtml);
				$("#activity_pane").hideLoading();
			}, 'json');
		} 

		//重置
		function clean() {
			$("input").val("");
			$('#groupName').val('');
			searchListForm();
		}
    </script>
    
</head>
<body>
	<div class="listArea" id="activity_pane" >
		<form id="searchForm" name="searchForm" method="post">
			<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
			<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" />
			<div class="listBg" >
				<div class="searchArea clearfix">
					<div class="searchLeft clearfix">
						<div class="searchInp clearfix">
						    <p>
						    <spring:message code="personnel_gName" />
						    </p>
                            <input class="w-customer"  id="groupName"  name="groupName"  >
						</div>
				    </div>
					<div class="searchRight clearfix" id="subItem">
						<!-- 检索 -->
						<button type="button" class="btn-js" onclick="searchListForm();">
							<spring:message code="commom_check" />
						</button>
						<!-- 重置 -->
						<button type="button" class="btn-js" onclick="clean();">
							<spring:message code="common_reset" />
						</button>
						<!-- 创建 -->
						<shiro:hasPermission name="personnel:group:edit">
						<button type="button" class="btn-cj"
							onclick="popup('900px','584px','${ctx}/personnel/group/form')">
						<spring:message code="common_create" />
						</button>
						</shiro:hasPermission>
					</div>
				</div>
			
				<div class="tableArea">
				<div class="tableScrollSm" style="overflow: auto;width: 1014px;height: 710px; ">
						<table cellpadding="0" class="tableHead">
							<thead>
								<tr>
									<th><p class="table-No"><spring:message code="common_no" /></p></th>
									<th><p class="table-groupname"><spring:message code="personnel_group_name" /></p></th>
									<th><p class="table-groupdes"><spring:message code="personnel_group_description" /></p></th>
									<th><p class="table-enableflag"><spring:message code="personnel_enableFlag" /></p></th>
									<th><p class="table-cjz"><spring:message code="personnel_creater" /></p></th>
									<th><p class="table-rq"><spring:message code="personnel_create_date" /></p></th>
								</tr>
							</thead>
						</table>
						
						<table cellpadding="0" class="tableBody"  style ="width:600px" >
							<tbody  id = "listHtml">
							</tbody>
						</table>
					</div>
				</div>
			</div>
			<div id = "paging" ></div>
		</form>
	</div>
</body>
</html>